/**
 * 
 */
package x10.eventServices.log;

import java.util.logging.Logger;

import x10.event.X10Event;
import x10.eventServices.X10EventListener;
import x10.log.CustomLevel;

/**
 * @author Denny Sheirer
 * @date   2011
 */
public class EventLogger implements X10EventListener {
    String eventListenerName = "EventLogger";
    Logger logger = Logger.getLogger(this.getClass().getName());
    
    /**
     * getEventListenerName() - returns the name of this X10EventListener class
     */
    public String getEventListenerName(){
	return eventListenerName;
    }
 
    /**
     * receiveEvent() - method to capture and log X10Events
     */
    public void receiveEvent(X10Event event){
	logger.log(CustomLevel.EVENT, event.toString());
    }
    
}
